package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SdQuotation generated by hbm2java
 */
@Entity
@Table(name="sd_quotation"
    ,catalog="ncsc_erp"
)
public class SdQuotation  implements java.io.Serializable {


     private long qtNo;
     private SdQuotationStatus sdQuotationStatus;
     private SysTermOfPayment sysTermOfPayment;
     private SdCust sdCust;
     private WfFlowTrans wfFlowTrans;
     private SdCustType sdCustType;
     private SysTitleName sysTitleName;
     private String qtCode;
     private String qtDescr;
     private Date qtDate;
     private String qtRefCustPoNo;
     private String qtCustCode;
     private String qtCustFirstName;
     private String qtCustMidName;
     private String qtCustLastName;
     private String qtCustIdCardNo;
     private String qtTermOfPaymentDescr;
     private BigDecimal qtDiscountPerc;
     private BigDecimal qtDiscountVal;
     private BigDecimal qtDiscountTotal;
     private short qtStatusIncVat;
     private BigDecimal qtVatPercVal;
     private BigDecimal qtTotalPriceExcVat;
     private BigDecimal qtTotalVat;
     private BigDecimal qtTotalPrice;
     private Set<SdQuotationItem> sdQuotationItems = new HashSet<SdQuotationItem>(0);
     private Set<SdSaleOrder> sdSaleOrders = new HashSet<SdSaleOrder>(0);
     private Set<SdQuotationCustContact> sdQuotationCustContacts = new HashSet<SdQuotationCustContact>(0);
     private Set<SdQuotationCustAddr> sdQuotationCustAddrs = new HashSet<SdQuotationCustAddr>(0);

    public SdQuotation() {
    }

	
    public SdQuotation(long qtNo, String qtCode, String qtDescr, Date qtDate, BigDecimal qtDiscountPerc, BigDecimal qtDiscountVal, BigDecimal qtDiscountTotal, short qtStatusIncVat, BigDecimal qtVatPercVal, BigDecimal qtTotalPriceExcVat, BigDecimal qtTotalVat, BigDecimal qtTotalPrice) {
        this.qtNo = qtNo;
        this.qtCode = qtCode;
        this.qtDescr = qtDescr;
        this.qtDate = qtDate;
        this.qtDiscountPerc = qtDiscountPerc;
        this.qtDiscountVal = qtDiscountVal;
        this.qtDiscountTotal = qtDiscountTotal;
        this.qtStatusIncVat = qtStatusIncVat;
        this.qtVatPercVal = qtVatPercVal;
        this.qtTotalPriceExcVat = qtTotalPriceExcVat;
        this.qtTotalVat = qtTotalVat;
        this.qtTotalPrice = qtTotalPrice;
    }
    public SdQuotation(long qtNo, SdQuotationStatus sdQuotationStatus, SysTermOfPayment sysTermOfPayment, SdCust sdCust, WfFlowTrans wfFlowTrans, SdCustType sdCustType, SysTitleName sysTitleName, String qtCode, String qtDescr, Date qtDate, String qtRefCustPoNo, String qtCustCode, String qtCustFirstName, String qtCustMidName, String qtCustLastName, String qtCustIdCardNo, String qtTermOfPaymentDescr, BigDecimal qtDiscountPerc, BigDecimal qtDiscountVal, BigDecimal qtDiscountTotal, short qtStatusIncVat, BigDecimal qtVatPercVal, BigDecimal qtTotalPriceExcVat, BigDecimal qtTotalVat, BigDecimal qtTotalPrice, Set<SdQuotationItem> sdQuotationItems, Set<SdSaleOrder> sdSaleOrders, Set<SdQuotationCustContact> sdQuotationCustContacts, Set<SdQuotationCustAddr> sdQuotationCustAddrs) {
       this.qtNo = qtNo;
       this.sdQuotationStatus = sdQuotationStatus;
       this.sysTermOfPayment = sysTermOfPayment;
       this.sdCust = sdCust;
       this.wfFlowTrans = wfFlowTrans;
       this.sdCustType = sdCustType;
       this.sysTitleName = sysTitleName;
       this.qtCode = qtCode;
       this.qtDescr = qtDescr;
       this.qtDate = qtDate;
       this.qtRefCustPoNo = qtRefCustPoNo;
       this.qtCustCode = qtCustCode;
       this.qtCustFirstName = qtCustFirstName;
       this.qtCustMidName = qtCustMidName;
       this.qtCustLastName = qtCustLastName;
       this.qtCustIdCardNo = qtCustIdCardNo;
       this.qtTermOfPaymentDescr = qtTermOfPaymentDescr;
       this.qtDiscountPerc = qtDiscountPerc;
       this.qtDiscountVal = qtDiscountVal;
       this.qtDiscountTotal = qtDiscountTotal;
       this.qtStatusIncVat = qtStatusIncVat;
       this.qtVatPercVal = qtVatPercVal;
       this.qtTotalPriceExcVat = qtTotalPriceExcVat;
       this.qtTotalVat = qtTotalVat;
       this.qtTotalPrice = qtTotalPrice;
       this.sdQuotationItems = sdQuotationItems;
       this.sdSaleOrders = sdSaleOrders;
       this.sdQuotationCustContacts = sdQuotationCustContacts;
       this.sdQuotationCustAddrs = sdQuotationCustAddrs;
    }
   
     @Id 

    
    @Column(name="QT_NO", unique=true, nullable=false)
    public long getQtNo() {
        return this.qtNo;
    }
    
    public void setQtNo(long qtNo) {
        this.qtNo = qtNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_STATUS_NO")
    public SdQuotationStatus getSdQuotationStatus() {
        return this.sdQuotationStatus;
    }
    
    public void setSdQuotationStatus(SdQuotationStatus sdQuotationStatus) {
        this.sdQuotationStatus = sdQuotationStatus;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_TERM_OF_PAYMENT_NO")
    public SysTermOfPayment getSysTermOfPayment() {
        return this.sysTermOfPayment;
    }
    
    public void setSysTermOfPayment(SysTermOfPayment sysTermOfPayment) {
        this.sysTermOfPayment = sysTermOfPayment;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_CUST_NO")
    public SdCust getSdCust() {
        return this.sdCust;
    }
    
    public void setSdCust(SdCust sdCust) {
        this.sdCust = sdCust;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_FT_NO")
    public WfFlowTrans getWfFlowTrans() {
        return this.wfFlowTrans;
    }
    
    public void setWfFlowTrans(WfFlowTrans wfFlowTrans) {
        this.wfFlowTrans = wfFlowTrans;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_CUST_TYPE_NO")
    public SdCustType getSdCustType() {
        return this.sdCustType;
    }
    
    public void setSdCustType(SdCustType sdCustType) {
        this.sdCustType = sdCustType;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_CUST_TITLE_NO")
    public SysTitleName getSysTitleName() {
        return this.sysTitleName;
    }
    
    public void setSysTitleName(SysTitleName sysTitleName) {
        this.sysTitleName = sysTitleName;
    }

    
    @Column(name="QT_CODE", nullable=false, length=50)
    public String getQtCode() {
        return this.qtCode;
    }
    
    public void setQtCode(String qtCode) {
        this.qtCode = qtCode;
    }

    
    @Column(name="QT_DESCR", nullable=false, length=100)
    public String getQtDescr() {
        return this.qtDescr;
    }
    
    public void setQtDescr(String qtDescr) {
        this.qtDescr = qtDescr;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="QT_DATE", nullable=false, length=10)
    public Date getQtDate() {
        return this.qtDate;
    }
    
    public void setQtDate(Date qtDate) {
        this.qtDate = qtDate;
    }

    
    @Column(name="QT_REF_CUST_PO_NO", length=30)
    public String getQtRefCustPoNo() {
        return this.qtRefCustPoNo;
    }
    
    public void setQtRefCustPoNo(String qtRefCustPoNo) {
        this.qtRefCustPoNo = qtRefCustPoNo;
    }

    
    @Column(name="QT_CUST_CODE", length=50)
    public String getQtCustCode() {
        return this.qtCustCode;
    }
    
    public void setQtCustCode(String qtCustCode) {
        this.qtCustCode = qtCustCode;
    }

    
    @Column(name="QT_CUST_FIRST_NAME", length=50)
    public String getQtCustFirstName() {
        return this.qtCustFirstName;
    }
    
    public void setQtCustFirstName(String qtCustFirstName) {
        this.qtCustFirstName = qtCustFirstName;
    }

    
    @Column(name="QT_CUST_MID_NAME", length=50)
    public String getQtCustMidName() {
        return this.qtCustMidName;
    }
    
    public void setQtCustMidName(String qtCustMidName) {
        this.qtCustMidName = qtCustMidName;
    }

    
    @Column(name="QT_CUST_LAST_NAME", length=50)
    public String getQtCustLastName() {
        return this.qtCustLastName;
    }
    
    public void setQtCustLastName(String qtCustLastName) {
        this.qtCustLastName = qtCustLastName;
    }

    
    @Column(name="QT_CUST_ID_CARD_NO", length=20)
    public String getQtCustIdCardNo() {
        return this.qtCustIdCardNo;
    }
    
    public void setQtCustIdCardNo(String qtCustIdCardNo) {
        this.qtCustIdCardNo = qtCustIdCardNo;
    }

    
    @Column(name="QT_TERM_OF_PAYMENT_DESCR", length=300)
    public String getQtTermOfPaymentDescr() {
        return this.qtTermOfPaymentDescr;
    }
    
    public void setQtTermOfPaymentDescr(String qtTermOfPaymentDescr) {
        this.qtTermOfPaymentDescr = qtTermOfPaymentDescr;
    }

    
    @Column(name="QT_DISCOUNT_PERC", nullable=false, precision=10)
    public BigDecimal getQtDiscountPerc() {
        return this.qtDiscountPerc;
    }
    
    public void setQtDiscountPerc(BigDecimal qtDiscountPerc) {
        this.qtDiscountPerc = qtDiscountPerc;
    }

    
    @Column(name="QT_DISCOUNT_VAL", nullable=false, precision=15)
    public BigDecimal getQtDiscountVal() {
        return this.qtDiscountVal;
    }
    
    public void setQtDiscountVal(BigDecimal qtDiscountVal) {
        this.qtDiscountVal = qtDiscountVal;
    }

    
    @Column(name="QT_DISCOUNT_TOTAL", nullable=false, precision=15)
    public BigDecimal getQtDiscountTotal() {
        return this.qtDiscountTotal;
    }
    
    public void setQtDiscountTotal(BigDecimal qtDiscountTotal) {
        this.qtDiscountTotal = qtDiscountTotal;
    }

    
    @Column(name="QT_STATUS_INC_VAT", nullable=false)
    public short getQtStatusIncVat() {
        return this.qtStatusIncVat;
    }
    
    public void setQtStatusIncVat(short qtStatusIncVat) {
        this.qtStatusIncVat = qtStatusIncVat;
    }

    
    @Column(name="QT_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getQtVatPercVal() {
        return this.qtVatPercVal;
    }
    
    public void setQtVatPercVal(BigDecimal qtVatPercVal) {
        this.qtVatPercVal = qtVatPercVal;
    }

    
    @Column(name="QT_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getQtTotalPriceExcVat() {
        return this.qtTotalPriceExcVat;
    }
    
    public void setQtTotalPriceExcVat(BigDecimal qtTotalPriceExcVat) {
        this.qtTotalPriceExcVat = qtTotalPriceExcVat;
    }

    
    @Column(name="QT_TOTAL_VAT", nullable=false, precision=15)
    public BigDecimal getQtTotalVat() {
        return this.qtTotalVat;
    }
    
    public void setQtTotalVat(BigDecimal qtTotalVat) {
        this.qtTotalVat = qtTotalVat;
    }

    
    @Column(name="QT_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getQtTotalPrice() {
        return this.qtTotalPrice;
    }
    
    public void setQtTotalPrice(BigDecimal qtTotalPrice) {
        this.qtTotalPrice = qtTotalPrice;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdQuotation")
    public Set<SdQuotationItem> getSdQuotationItems() {
        return this.sdQuotationItems;
    }
    
    public void setSdQuotationItems(Set<SdQuotationItem> sdQuotationItems) {
        this.sdQuotationItems = sdQuotationItems;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdQuotation")
    public Set<SdSaleOrder> getSdSaleOrders() {
        return this.sdSaleOrders;
    }
    
    public void setSdSaleOrders(Set<SdSaleOrder> sdSaleOrders) {
        this.sdSaleOrders = sdSaleOrders;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdQuotation")
    public Set<SdQuotationCustContact> getSdQuotationCustContacts() {
        return this.sdQuotationCustContacts;
    }
    
    public void setSdQuotationCustContacts(Set<SdQuotationCustContact> sdQuotationCustContacts) {
        this.sdQuotationCustContacts = sdQuotationCustContacts;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sdQuotation")
    public Set<SdQuotationCustAddr> getSdQuotationCustAddrs() {
        return this.sdQuotationCustAddrs;
    }
    
    public void setSdQuotationCustAddrs(Set<SdQuotationCustAddr> sdQuotationCustAddrs) {
        this.sdQuotationCustAddrs = sdQuotationCustAddrs;
    }




}


